With coming of a mobile Internet era, social, local, and mobile have become a mainstream pattern in the Internet industry. Particularly, with popularization of a mobile terminal device equipped with a wireless fidelity (Wi-Fi, wireless fidelity) interface, a Wi-Fi-based social application is becoming a hot topic in the industry. Therefore, the Wi-Fi Alliance (WFA, Wi-Fi Alliance) establishes a task force for the social (social) application, such as neighbor awareness networking (NAN, Neighbor Awareness Networking), so as to study impact of the Wi-Fi-based social application on Wi-Fi, and formulate related standards.
A typical scenario studied by the NAN task force is that before associating with each other, peer mobile devices mutually discover the devices and services that can be provided by the devices. For example, in a social game application, two mobile devices discover each other by using Wi-Fi, and confirm whether a counterpart device has a same game hobby as itself before associating with each other, so as to avoid a waste of signaling overheads caused due to the fact that the two devices are found have different interests after they are associated with each other. For another example, in a friend discovery application, when two devices that both enable the friend discovery application approach to each other, the devices remind users of appearance of a counterpart device. The key to the foregoing discovery process is device discovery and service discovery which can be simultaneously completed. The former is relatively simple, but the latter is relatively complex due to the diversity of services. Therefore, service discovery is currently a main study topic, and is also a main objective of the present invention.
Technically, a process of service discovery is completed mainly by using the following method: A detection device transmits a service advertisement message on a social channel (which is usually a 1/6/11 channel on the 2.4 GHz band), and then monitors a service response message; and after a peer device detects, by listening, the service advertisement message, if service information carried by the service advertisement message indicates that the service information meets a requirement of the peer device, the peer device sends a service discovery response message. According to a service discovery requirement of the NAN, even though a service discovery task is already finished, a service discovery mechanism still needs to be continuously operating in a background (because there is generally more than one target of service discovery). In a case in which Wi-Fi devices are densely distributed, because the solution in the prior art requires that each detection device should frequently send a service advertisement message to ensure relatively high discovery efficiency, the social channel is filled with small packets of this type of service advertisement message, causing “a small-packet storm” and low service discovery efficiency and media utilization, and greatly affecting normal operating of another Wi-Fi network.